package cn.edu.scau.cmi.huangxiaodong.singleton;

import java.util.Vector;

public class Marshal {
    private static Marshal instance;
    private  String name;
    private static int number=0;
    private static Vector namset=new Vector();
    private Marshal(String name) {
   	 this.name=name;
    }
    public static Marshal getInstance(String name) {
   	 if(number<10) {
   		 if(!name.equals("")) {
   			 instance=new Marshal(name);
   	   	     number++;	 
   	   	     namset.add(name);
   		 }
   	 }
   	 return instance;
    }
    public   String getName() {
   	 return name;
    }
    public static  int getNum() {
    	return number;
    }
    public static Vector getNamset() {
    	return namset;
    }
}
